<template>
  <div>
    <PresonalFrom @handleRequest="handleRequest" :form="form" :fileList="image_path"></PresonalFrom>
  </div>
</template>
<script>
import { GET } from "../../Network/Request";

import { PresonalFrom } from "../../components/index.js";
export default {
  name: "editPersonal",
  components: {
    PresonalFrom
  },
  data() {
    return {
      form: {},
      image_path: []
    };
  },
  methods: {
    handleRequests() {
      let { id } = this.$route.query;
      GET("api/personal/details", { id }).then(res => {
        this.form = res.data[0];
        if (res.data[0].description_image_path != null) {
          this.image_path = [
            { name: "", url: res.data[0].description_image_path }
          ];
        }
      });
    },
    // 子组件传递过来的方法
    handleRequest() {}
  },
  mounted() {
    this.handleRequests();
  }
};
</script>
<style lang='less'>
</style>